<template>
  <div>
    <b>活动图片：</b>
    <img :src="this.newActivity.image"
         width="100"
         height="100" />
    <br><br>
    <b>活动标题：{{activity.name}}</b>
    <br><br>
    <b>活动地点：{{activity.address}}</b>
    <br><br>
    <b>活动时间：{{activity.time}}</b>
    <br><br>
    <b>活动内容：{{activity.content}}</b>
    <br><br>
    <b v-if="this.newActivity.result === 0">
      活动进程：未开始
    </b>
    <b v-if="this.newActivity.result === 1">
      活动进程：报名中
    </b>
    <b v-if="this.newActivity.result === 2">
      活动进程：已结束
    </b>

  </div>
</template>

<script>
export default {
  data () {
    return {
      newActivity: {},
    }
  },
  props: {
    activity: {},//用来接收父组件传过来的数据
  },
  mounted () {
    this.newActivity = JSON.parse(JSON.stringify(this.activity));
    console.log(this.newActivity);
  }
}
</script>

<style scoped>
b {
  font-size: 15px;
  display: inline;
}
p {
  font-size: 15px;
  display: inline;
}
</style>